  /**
   * Generate time : 2013-07-16 0:43:09
   * Version : 1.0.1.V20070717
   */
package com.baosight.sczx.zm.cp.domain;

import com.baosight.iplat4j.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;
/**
 * ZMCBYearPlanZB 
 * table comment : 主要生产指标 
 */
public class ZMCPYearPlanZB extends DaoEPBase {

	private String fdKeyId = " ";		/* FD_KEY_ID*/
	private String fdForeignId = " ";		/* 矿井id*/
	private String fdItem = " ";		/* 项目名称*/
	private String fdUnit = " ";		/* 单位*/
	private Integer fdNo = new Integer(0);		/* 序号*/
	private Double fdSurplusLength = new Double(0);		/* 当年计划*/
	private Double fdSurplusReserve = new Double(0);		/* 当年实际*/
	private String fdYearGetway = " ";		/* 年份*/
	private String fdLastyearGetway = " ";		/* 上一年取值方式*/
	private String fdItemType = " ";		/* 指标类型*/

	/**
	 * initialize the metadata 
	 */
	public void initMetaData() {
		EiColumn eiColumn;
		
	eiColumn = new EiColumn("fdKeyId");
	eiColumn.setPrimaryKey(true);
	eiColumn.setFieldLength(32);	
	eiColumn.setDescName("FD_KEY_ID");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdYearGetway");
	eiColumn.setFieldLength(4);	
	eiColumn.setDescName("年份");
	eiColumn.setDescName("FD_YEAR_GETWAY");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdLastyearGetway");
	eiColumn.setFieldLength(4);	
	eiColumn.setDescName("上一年取值方式");
	eiColumn.setDescName("FD_LASTYEAR_GETWAY");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdForeignId");
	eiColumn.setFieldLength(32);	
	eiColumn.setDescName("矿井id");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdItem");
	eiColumn.setFieldLength(50);	
	eiColumn.setDescName("项目名称");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdUnit");
	eiColumn.setFieldLength(20);	
	eiColumn.setDescName("单位");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdSurplusLength");
	eiColumn.setType("N");
	eiColumn.setScaleLength(4);
	eiColumn.setFieldLength(12);
	eiColumn.setDescName("当年计划");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdNo");
	eiColumn.setType("N");
	eiColumn.setFieldLength(4);
	eiColumn.setDescName("序号");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdSurplusReserve");
	eiColumn.setType("N");
	eiColumn.setScaleLength(4);
	eiColumn.setFieldLength(12);
	eiColumn.setDescName("上一年实际");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdItemType");
	eiColumn.setFieldLength(20);	
	eiColumn.setDescName("项目类型");
	eiMetadata.addMeta(eiColumn);

	}
	/**
	 * the constructor
	 */
	public ZMCPYearPlanZB() {
		initMetaData();
	}
	
	/**
	 * get the fdKeyId - FD_KEY_ID
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}
	
	/**
	 * set the fdKeyId - FD_KEY_ID
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}
	
	/**
	 * get the fdKeyId - FD_KEY_ID
	 * @return the fdKeyId
	 */
	public int getFdNo() {
		return this.fdNo;
	}
	
	/**
	 * set the fdKeyId - FD_KEY_ID
	 */
	public void setFdNo(int fdNo) {
		this.fdNo = fdNo;
	}
	
	/**
	 * get the fdYearGetway - FD_KEY_ID
	 * @return the fdKeyId
	 */
	public String getFdYearGetway() {
		return this.fdYearGetway;
	}
	
	/**
	 * set the fdYearGetway - FD_KEY_ID
	 */
	public void setFdYearGetway(String fdYearGetway) {
		this.fdYearGetway = fdYearGetway;
	}
	
	/**
	 * get the fdLastyearGetway - FD_KEY_ID
	 * @return the fdKeyId
	 */
	public String getFdLastyearGetway() {
		return this.fdLastyearGetway;
	}
	
	/**
	 * set the fdLastyearGetway - FD_KEY_ID
	 */
	public void setFdLastyearGetway(String fdLastyearGetway) {
		this.fdLastyearGetway = fdLastyearGetway;
	}
	
	/**
	 * get the fdForeignId - 矿井id
	 * @return the fdForeignId
	 */
	public String getFdForeignId() {
		return this.fdForeignId;
	}
	
	/**
	 * set the fdForeignId - 矿井id
	 */
	public void setFdForeignId(String fdForeignId) {
		this.fdForeignId = fdForeignId;
	}
	
	/**
	 * get the fdItem - 项目名称
	 * @return the fdItem
	 */
	public String getFdItem() {
		return this.fdItem;
	}
	
	/**
	 * set the fdItem - 项目名称
	 */
	public void setFdItem(String fdItem) {
		this.fdItem = fdItem;
	}
	
	/**
	 * get the fdUnit - 单位
	 * @return the fdUnit
	 */
	public String getFdUnit() {
		return this.fdUnit;
	}
	
	/**
	 * set the fdUnit - 单位
	 */
	public void setFdUnit(String fdUnit) {
		this.fdUnit = fdUnit;
	}
	
	/**
	 * get the fdSurplusLength - 当年计划
	 * @return the fdSurplusLength
	 */
	public Double getFdSurplusLength() {
		return this.fdSurplusLength;
	}
	
	/**
	 * set the fdSurplusLength - 当年计划
	 */
	public void setFdSurplusLength(Double fdSurplusLength) {
		this.fdSurplusLength = fdSurplusLength;
	}
	
	/**
	 * get the fdSurplusReserve - 上一年实际
	 * @return the fdSurplusReserve
	 */
	public Double getFdSurplusReserve() {
		return this.fdSurplusReserve;
	}
	
	/**
	 * set the fdSurplusReserve - 上一年实际
	 */
	public void setFdSurplusReserve(Double fdSurplusReserve) {
		this.fdSurplusReserve = fdSurplusReserve;
	}
	
	/**
	 * get the fdItemType - 项目类型
	 * @return the fdItemType
	 */
	public String getFdItemType() {
		return this.fdItemType;
	}
	
	/**
	 * set the fdItemType - 项目类型
	 */
	public void setFdItemType(String fdItemType) {
		this.fdItemType = fdItemType;
	}
	
	/**
	 * get the value from Map
	 */
	public void fromMap(Map map) {
	
		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdYearGetway(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdYearGetway")), fdYearGetway));
		setFdLastyearGetway(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdLastyearGetway")), fdLastyearGetway));
		setFdForeignId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdForeignId")), fdForeignId));
		setFdItem(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdItem")), fdItem));
		setFdUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdUnit")), fdUnit));
		setFdSurplusLength(NumberUtils.toDouble(StringUtils.toString(map.get("fdSurplusLength")), fdSurplusLength));
		setFdNo(NumberUtils.toInteger(StringUtils.toString(map.get("fdNo")), fdNo));
		setFdSurplusReserve(NumberUtils.toDouble(StringUtils.toString(map.get("fdSurplusReserve")), fdSurplusReserve));
		setFdItemType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdItemType")), fdItemType));

	}
	
	/**
	 * set the value to Map
	 */
	public Map toMap() {
		
		Map map = new HashMap();
			map.put("fdKeyId",StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));	
			map.put("fdYearGetway",StringUtils.toString(fdYearGetway, eiMetadata.getMeta("fdYearGetway")));	
			map.put("fdLastyearGetway",StringUtils.toString(fdLastyearGetway, eiMetadata.getMeta("fdLastyearGetway")));	
			map.put("fdForeignId",StringUtils.toString(fdForeignId, eiMetadata.getMeta("fdForeignId")));	
			map.put("fdItem",StringUtils.toString(fdItem, eiMetadata.getMeta("fdItem")));	
			map.put("fdUnit",StringUtils.toString(fdUnit, eiMetadata.getMeta("fdUnit")));	
			map.put("fdSurplusLength",StringUtils.toString(fdSurplusLength, eiMetadata.getMeta("fdSurplusLength")));	
			map.put("fdNo",StringUtils.toString(fdNo, eiMetadata.getMeta("fdNo")));	
			map.put("fdSurplusReserve",StringUtils.toString(fdSurplusReserve, eiMetadata.getMeta("fdSurplusReserve")));	
			map.put("fdItemType",StringUtils.toString(fdItemType, eiMetadata.getMeta("fdItemType")));	

			
		return map;
	
	}
}